<template>
	<div id="priceList">
		<div class="priceList1" v-for="b in blist">
			<img :src="b.picUrl">
			<h5>{{b.mpName}}</h5>
			<p>￥{{b.price}}<span class="shop">&#xe601;</span></p>
		</div>

		<div class="h"> 
			 <a href="#" v-show="scroll>2800">
				<img src="/static/images/top_03.gif">
			</a> 
		</div>
	</div>
</template>
<script type="text/javascript">
	export default{
		data(){
			return{
				blist:[],
				heigths:0,
				scroll:""
			}
		},
		methods:{
			// 返回顶部效果
			menu(){
				this.scroll=document.body.scrollTop;
				// console.log(this.scroll)
			},
			request(){
				this.$http({
					url:"http://m.laiyifen.com/cms/page/module/getModuleData?moduleId=1003021100000013&categoryId=-1&pageNo=1&pageSize=10",
					// method:"get",
					
				}).then(function(res){
					console.log(res);
					this.blist = res.body.data.listObj
					console.log(res.body.data.listObj)
				})
			}
		},
		mounted(){
			this.request();
			// 添加事件
			window.addEventListener('scroll',this.menu)
		},
	}
</script>
<style type="text/css" scoped>
	 .shop{
		font-family: 'iconfont';
		font-size: 0.65rem;
		color:#ff6900;
		margin-right: .2rem;
		/*margin-bottom: .2rem;*/
	}
	@font-face {
	  font-family: 'iconfont';  /* project id 345259 */
	  src: url('//at.alicdn.com/t/font_345259_2brv90ek6vtpgb9.eot');
	  src: url('//at.alicdn.com/t/font_345259_2brv90ek6vtpgb9.eot?#iefix') format('embedded-opentype'),
	  url('//at.alicdn.com/t/font_345259_2brv90ek6vtpgb9.woff') format('woff'),
	  url('//at.alicdn.com/t/font_345259_2brv90ek6vtpgb9.ttf') format('truetype'),
	  url('//at.alicdn.com/t/font_345259_2brv90ek6vtpgb9.svg#iconfont') format('svg');
	}


	#priceList{
		width:100%;
		display:flex;
		flex-wrap: wrap;
		background:#e5e5e5;
		border-top:.35rem #e5e5e5 solid;	
		margin-top: .2rem;
		margin-bottom:1.45rem;
	}
	#priceList .priceList1{
		width:45%;
		margin-left: .3324324rem;
		background:#fff;
		margin-bottom: .4rem;
	}
	#priceList .priceList1>img{
		width:100%;
	}
	#priceList .priceList1>h5{
		font-size: .38rem;
		color:#555;
		margin-left:.2rem;
	}
	#priceList .priceList1>p{
		font-size: .4rem;
		color:#ff6900;
		display: flex;
		margin-top: -.3rem;
		justify-content: space-between;
		margin-left:.2rem;
	}
	.h a{
		position: fixed;
		right:.5rem;
		top:14rem;
	}
	.h a img{
		width:1.2rem;
	}
</style>